// pages/show/show.js
const app=getApp()

Page({
  /**
   * 页面的初始数据
   */
  data: {
   

    masklist:[
      {
        img:'https://eco-beauty.dior.cn/dw/image/v2/BDGF_PRD/on/demandware.static/-/Sites-master_dior/default/dw64b5efc2/assets/Y0996476/Y0996476_C099600782_E01_ZHC.jpg?sw=870&sh=580&sm=fit&imwidth=870',
        title:'迪奥桀骜男士运动淡香氛',
        price:'￥1130',
        id:1
      },
      {
        img:'https://www.dior.cn/couture/ecommerce/media/catalog/product/cache/1/cover_image_1/870x580/17f82f742ffe127f42dca9de82fb58b1/Z/q/1681297743_JGEM95022_0000_E01_ZHC.jpg?imwidth=384 384w, https://www.dior.cn/couture/ecommerce/media/catalog/product/cache/1/cover_image_1/870x580/17f82f742ffe127f42dca9de82fb58b1/Z/q/1681297743_JGEM95022_0000_E01_ZHC.jpg?imwidth=640 640w, https://www.dior.cn/couture/ecommerce/media/catalog/product/cache/1/cover_image_1/870x580/17f82f742ffe127f42dca9de82fb58b1/Z/q/1681297743_JGEM95022_0000_E01_ZHC.jpg?imwidth=750 750w, https://www.dior.cn/couture/ecommerce/media/catalog/product/cache/1/cover_image_1/870x580/17f82f742ffe127f42dca9de82fb58b1/Z/q/1681297743_JGEM95022_0000_E01_ZHC.jpg?imwidth=828 828w, https://www.dior.cn/couture/ecommerce/media/catalog/product/cache/1/cover_image_1/870x580/17f82f742ffe127f42dca9de82fb58b1/Z/q/1681297743_JGEM95022_0000_E01_ZHC.jpg?imwidth=1080 1080w, https://www.dior.cn/couture/ecommerce/media/catalog/product/cache/1/cover_image_1/870x580/17f82f742ffe127f42dca9de82fb58b1/Z/q/1681297743_JGEM95022_0000_E01_ZHC.jpg?imwidth=1200 1200w, https://www.dior.cn/couture/ecommerce/media/catalog/product/cache/1/cover_image_1/870x580/17f82f742ffe127f42dca9de82fb58b1/Z/q/1681297743_JGEM95022_0000_E01_ZHC.jpg?imwidth=1920 1920w, https://www.dior.cn/couture/ecommerce/media/catalog/product/cache/1/cover_image_1/870x580/17f82f742ffe127f42dca9de82fb58b1/Z/q/1681297743_JGEM95022_0000_E01_ZHC.jpg?imwidth=2048 2048w, https://www.dior.cn/couture/ecommerce/media/catalog/product/cache/1/cover_image_1/870x580/17f82f742ffe127f42dca9de82fb58b1/Z/q/1681297743_JGEM95022_0000_E01_ZHC.jpg?imwidth=3840 3840w',
        title:'GEM DIOR 戒指',
        price:'￥17600',
        id:2
      },
      {
        img:'https://eco-beauty.dior.cn/dw/image/v2/BDGF_PRD/on/demandware.static/-/Sites-master_dior/default/dwcc135492/assets/Y0345005/Y0345005_C034700915_E01_ZHC.jpg?sw=870&sh=580&sm=fit&imwidth=870',
        title:'迪奥烈艳蓝金唇膏 MITZAH限量版',
        price:'￥390',
        id:3
      },
      {
        img:'https://eco-beauty.dior.cn/dw/image/v2/BDGF_PRD/on/demandware.static/-/Sites-master_dior/default/dwe9b9e030/assets/Y0334000/Y0334000_C033400001_E01_ZHC.jpg?sw=870&sh=580&sm=fit&imwidth=870',
        title:'迪奥惊艳十色眼影印花限量版',
        price:'￥1300',
        id:4
      },
      {
        img:'https://eco-beauty.dior.cn/dw/image/v2/BDGF_PRD/on/demandware.static/-/Sites-master_dior/default/dw4cfba162/assets/Y0352008/Y0352008_C035200010_E01_ZHC.jpg?sw=870&sh=580&sm=fit&imwidth=870',
        title:'迪奥锁妆气垫蜜粉*',
        price:'￥605',
        id:5
      },
      {
        img:'https://eco-beauty.dior.cn/dw/image/v2/BDGF_PRD/on/demandware.static/-/Sites-master_dior/default/dwd446ed0e/assets/Y0996491/Y0996491_C099672980_E01_ZHC.jpg?sw=870&sh=580&sm=fit&imwidth=870',
        title:'真我纯真香水',
        price:'￥1650',
        id:6
      },
      {
        img:'https://www.dior.cn/couture/ecommerce/media/catalog/product/cache/1/cover_image_1/870x580/17f82f742ffe127f42dca9de82fb58b1/e/8/1685025939_S2201UMFV_M900_E01_ZHC.jpg?imwidth=384 384w, https://www.dior.cn/couture/ecommerce/media/catalog/product/cache/1/cover_image_1/870x580/17f82f742ffe127f42dca9de82fb58b1/e/8/1685025939_S2201UMFV_M900_E01_ZHC.jpg?imwidth=640 640w, https://www.dior.cn/couture/ecommerce/media/catalog/product/cache/1/cover_image_1/870x580/17f82f742ffe127f42dca9de82fb58b1/e/8/1685025939_S2201UMFV_M900_E01_ZHC.jpg?imwidth=750 750w, https://www.dior.cn/couture/ecommerce/media/catalog/product/cache/1/cover_image_1/870x580/17f82f742ffe127f42dca9de82fb58b1/e/8/1685025939_S2201UMFV_M900_E01_ZHC.jpg?imwidth=828 828w, https://www.dior.cn/couture/ecommerce/media/catalog/product/cache/1/cover_image_1/870x580/17f82f742ffe127f42dca9de82fb58b1/e/8/1685025939_S2201UMFV_M900_E01_ZHC.jpg?imwidth=1080 1080w, https://www.dior.cn/couture/ecommerce/media/catalog/product/cache/1/cover_image_1/870x580/17f82f742ffe127f42dca9de82fb58b1/e/8/1685025939_S2201UMFV_M900_E01_ZHC.jpg?imwidth=1200 1200w, https://www.dior.cn/couture/ecommerce/media/catalog/product/cache/1/cover_image_1/870x580/17f82f742ffe127f42dca9de82fb58b1/e/8/1685025939_S2201UMFV_M900_E01_ZHC.jpg?imwidth=1920 1920w, https://www.dior.cn/couture/ecommerce/media/catalog/product/cache/1/cover_image_1/870x580/17f82f742ffe127f42dca9de82fb58b1/e/8/1685025939_S2201UMFV_M900_E01_ZHC.jpg?imwidth=2048 2048w, https://www.dior.cn/couture/ecommerce/media/catalog/product/cache/1/cover_image_1/870x580/17f82f742ffe127f42dca9de82fb58b1/e/8/1685025939_S2201UMFV_M900_E01_ZHC.jpg?imwidth=3840 3840w',
        title:'SIGNATURE 椭圆相机包',
        price:'￥17500',
        id:7
      },
      {
        img:'https://www.dior.cn/couture/ecommerce/media/catalog/product/cache/1/cover_image_1/870x580/17f82f742ffe127f42dca9de82fb58b1/q/Z/1683135195_B1939WOMCY_D01X_E01_ZHC.jpg?imwidth=384 384w, https://www.dior.cn/couture/ecommerce/media/catalog/product/cache/1/cover_image_1/870x580/17f82f742ffe127f42dca9de82fb58b1/q/Z/1683135195_B1939WOMCY_D01X_E01_ZHC.jpg?imwidth=640 640w, https://www.dior.cn/couture/ecommerce/media/catalog/product/cache/1/cover_image_1/870x580/17f82f742ffe127f42dca9de82fb58b1/q/Z/1683135195_B1939WOMCY_D01X_E01_ZHC.jpg?imwidth=750 750w, https://www.dior.cn/couture/ecommerce/media/catalog/product/cache/1/cover_image_1/870x580/17f82f742ffe127f42dca9de82fb58b1/q/Z/1683135195_B1939WOMCY_D01X_E01_ZHC.jpg?imwidth=828 828w, https://www.dior.cn/couture/ecommerce/media/catalog/product/cache/1/cover_image_1/870x580/17f82f742ffe127f42dca9de82fb58b1/q/Z/1683135195_B1939WOMCY_D01X_E01_ZHC.jpg?imwidth=1080 1080w, https://www.dior.cn/couture/ecommerce/media/catalog/product/cache/1/cover_image_1/870x580/17f82f742ffe127f42dca9de82fb58b1/q/Z/1683135195_B1939WOMCY_D01X_E01_ZHC.jpg?imwidth=1200 1200w, https://www.dior.cn/couture/ecommerce/media/catalog/product/cache/1/cover_image_1/870x580/17f82f742ffe127f42dca9de82fb58b1/q/Z/1683135195_B1939WOMCY_D01X_E01_ZHC.jpg?imwidth=1920 1920w, https://www.dior.cn/couture/ecommerce/media/catalog/product/cache/1/cover_image_1/870x580/17f82f742ffe127f42dca9de82fb58b1/q/Z/1683135195_B1939WOMCY_D01X_E01_ZHC.jpg?imwidth=2048 2048w, https://www.dior.cn/couture/ecommerce/media/catalog/product/cache/1/cover_image_1/870x580/17f82f742ffe127f42dca9de82fb58b1/q/Z/1683135195_B1939WOMCY_D01X_E01_ZHC.jpg?imwidth=3840 3840w',
        title:'PETIT CD 手链',
        price:'￥3100',
        id:8
      },
      {
        img:'https://eco-beauty.dior.cn/dw/image/v2/BDGF_PRD/on/demandware.static/-/Sites-master_dior/default/dw64b5efc2/assets/Y0996476/Y0996476_C099600782_E01_ZHC.jpg?sw=870&sh=580&sm=fit&imwidth=870',
        title:'迪奥桀骜男士运动淡香氛',
        price:'￥1130',
        id:9
      },
      {
        img:'https://www.dior.cn/couture/ecommerce/media/catalog/product/cache/1/cover_image_1/870x580/17f82f742ffe127f42dca9de82fb58b1/Z/q/1681297743_JGEM95022_0000_E01_ZHC.jpg?imwidth=384 384w, https://www.dior.cn/couture/ecommerce/media/catalog/product/cache/1/cover_image_1/870x580/17f82f742ffe127f42dca9de82fb58b1/Z/q/1681297743_JGEM95022_0000_E01_ZHC.jpg?imwidth=640 640w, https://www.dior.cn/couture/ecommerce/media/catalog/product/cache/1/cover_image_1/870x580/17f82f742ffe127f42dca9de82fb58b1/Z/q/1681297743_JGEM95022_0000_E01_ZHC.jpg?imwidth=750 750w, https://www.dior.cn/couture/ecommerce/media/catalog/product/cache/1/cover_image_1/870x580/17f82f742ffe127f42dca9de82fb58b1/Z/q/1681297743_JGEM95022_0000_E01_ZHC.jpg?imwidth=828 828w, https://www.dior.cn/couture/ecommerce/media/catalog/product/cache/1/cover_image_1/870x580/17f82f742ffe127f42dca9de82fb58b1/Z/q/1681297743_JGEM95022_0000_E01_ZHC.jpg?imwidth=1080 1080w, https://www.dior.cn/couture/ecommerce/media/catalog/product/cache/1/cover_image_1/870x580/17f82f742ffe127f42dca9de82fb58b1/Z/q/1681297743_JGEM95022_0000_E01_ZHC.jpg?imwidth=1200 1200w, https://www.dior.cn/couture/ecommerce/media/catalog/product/cache/1/cover_image_1/870x580/17f82f742ffe127f42dca9de82fb58b1/Z/q/1681297743_JGEM95022_0000_E01_ZHC.jpg?imwidth=1920 1920w, https://www.dior.cn/couture/ecommerce/media/catalog/product/cache/1/cover_image_1/870x580/17f82f742ffe127f42dca9de82fb58b1/Z/q/1681297743_JGEM95022_0000_E01_ZHC.jpg?imwidth=2048 2048w, https://www.dior.cn/couture/ecommerce/media/catalog/product/cache/1/cover_image_1/870x580/17f82f742ffe127f42dca9de82fb58b1/Z/q/1681297743_JGEM95022_0000_E01_ZHC.jpg?imwidth=3840 3840w',
        title:'GEM DIOR 戒指',
        price:'￥17600',
        id:10
      },
      {
        img:'https://eco-beauty.dior.cn/dw/image/v2/BDGF_PRD/on/demandware.static/-/Sites-master_dior/default/dwcc135492/assets/Y0345005/Y0345005_C034700915_E01_ZHC.jpg?sw=870&sh=580&sm=fit&imwidth=870',
        title:'迪奥烈艳蓝金唇膏 MITZAH限量版',
        price:'￥390',
        id:11
      },
      {
        img:'https://eco-beauty.dior.cn/dw/image/v2/BDGF_PRD/on/demandware.static/-/Sites-master_dior/default/dwe9b9e030/assets/Y0334000/Y0334000_C033400001_E01_ZHC.jpg?sw=870&sh=580&sm=fit&imwidth=870',
        title:'迪奥惊艳十色眼影印花限量版',
        price:'￥1300',
        id:12
      },
      {
        img:'https://eco-beauty.dior.cn/dw/image/v2/BDGF_PRD/on/demandware.static/-/Sites-master_dior/default/dw4cfba162/assets/Y0352008/Y0352008_C035200010_E01_ZHC.jpg?sw=870&sh=580&sm=fit&imwidth=870',
        title:'迪奥锁妆气垫蜜粉*',
        price:'￥605',
        id:13
      },
      {
        img:'https://eco-beauty.dior.cn/dw/image/v2/BDGF_PRD/on/demandware.static/-/Sites-master_dior/default/dwd446ed0e/assets/Y0996491/Y0996491_C099672980_E01_ZHC.jpg?sw=870&sh=580&sm=fit&imwidth=870',
        title:'真我纯真香水',
        price:'￥1650',
        id:14
      },
      {
        img:'https://www.dior.cn/couture/ecommerce/media/catalog/product/cache/1/cover_image_1/870x580/17f82f742ffe127f42dca9de82fb58b1/e/8/1685025939_S2201UMFV_M900_E01_ZHC.jpg?imwidth=384 384w, https://www.dior.cn/couture/ecommerce/media/catalog/product/cache/1/cover_image_1/870x580/17f82f742ffe127f42dca9de82fb58b1/e/8/1685025939_S2201UMFV_M900_E01_ZHC.jpg?imwidth=640 640w, https://www.dior.cn/couture/ecommerce/media/catalog/product/cache/1/cover_image_1/870x580/17f82f742ffe127f42dca9de82fb58b1/e/8/1685025939_S2201UMFV_M900_E01_ZHC.jpg?imwidth=750 750w, https://www.dior.cn/couture/ecommerce/media/catalog/product/cache/1/cover_image_1/870x580/17f82f742ffe127f42dca9de82fb58b1/e/8/1685025939_S2201UMFV_M900_E01_ZHC.jpg?imwidth=828 828w, https://www.dior.cn/couture/ecommerce/media/catalog/product/cache/1/cover_image_1/870x580/17f82f742ffe127f42dca9de82fb58b1/e/8/1685025939_S2201UMFV_M900_E01_ZHC.jpg?imwidth=1080 1080w, https://www.dior.cn/couture/ecommerce/media/catalog/product/cache/1/cover_image_1/870x580/17f82f742ffe127f42dca9de82fb58b1/e/8/1685025939_S2201UMFV_M900_E01_ZHC.jpg?imwidth=1200 1200w, https://www.dior.cn/couture/ecommerce/media/catalog/product/cache/1/cover_image_1/870x580/17f82f742ffe127f42dca9de82fb58b1/e/8/1685025939_S2201UMFV_M900_E01_ZHC.jpg?imwidth=1920 1920w, https://www.dior.cn/couture/ecommerce/media/catalog/product/cache/1/cover_image_1/870x580/17f82f742ffe127f42dca9de82fb58b1/e/8/1685025939_S2201UMFV_M900_E01_ZHC.jpg?imwidth=2048 2048w, https://www.dior.cn/couture/ecommerce/media/catalog/product/cache/1/cover_image_1/870x580/17f82f742ffe127f42dca9de82fb58b1/e/8/1685025939_S2201UMFV_M900_E01_ZHC.jpg?imwidth=3840 3840w',
        title:'SIGNATURE 椭圆相机包',
        price:'￥17500',
        id:15
      },
      {
        img:'https://www.dior.cn/couture/ecommerce/media/catalog/product/cache/1/cover_image_1/870x580/17f82f742ffe127f42dca9de82fb58b1/q/Z/1683135195_B1939WOMCY_D01X_E01_ZHC.jpg?imwidth=384 384w, https://www.dior.cn/couture/ecommerce/media/catalog/product/cache/1/cover_image_1/870x580/17f82f742ffe127f42dca9de82fb58b1/q/Z/1683135195_B1939WOMCY_D01X_E01_ZHC.jpg?imwidth=640 640w, https://www.dior.cn/couture/ecommerce/media/catalog/product/cache/1/cover_image_1/870x580/17f82f742ffe127f42dca9de82fb58b1/q/Z/1683135195_B1939WOMCY_D01X_E01_ZHC.jpg?imwidth=750 750w, https://www.dior.cn/couture/ecommerce/media/catalog/product/cache/1/cover_image_1/870x580/17f82f742ffe127f42dca9de82fb58b1/q/Z/1683135195_B1939WOMCY_D01X_E01_ZHC.jpg?imwidth=828 828w, https://www.dior.cn/couture/ecommerce/media/catalog/product/cache/1/cover_image_1/870x580/17f82f742ffe127f42dca9de82fb58b1/q/Z/1683135195_B1939WOMCY_D01X_E01_ZHC.jpg?imwidth=1080 1080w, https://www.dior.cn/couture/ecommerce/media/catalog/product/cache/1/cover_image_1/870x580/17f82f742ffe127f42dca9de82fb58b1/q/Z/1683135195_B1939WOMCY_D01X_E01_ZHC.jpg?imwidth=1200 1200w, https://www.dior.cn/couture/ecommerce/media/catalog/product/cache/1/cover_image_1/870x580/17f82f742ffe127f42dca9de82fb58b1/q/Z/1683135195_B1939WOMCY_D01X_E01_ZHC.jpg?imwidth=1920 1920w, https://www.dior.cn/couture/ecommerce/media/catalog/product/cache/1/cover_image_1/870x580/17f82f742ffe127f42dca9de82fb58b1/q/Z/1683135195_B1939WOMCY_D01X_E01_ZHC.jpg?imwidth=2048 2048w, https://www.dior.cn/couture/ecommerce/media/catalog/product/cache/1/cover_image_1/870x580/17f82f742ffe127f42dca9de82fb58b1/q/Z/1683135195_B1939WOMCY_D01X_E01_ZHC.jpg?imwidth=3840 3840w',
        title:'PETIT CD 手链',
        price:'￥3100',
        id:16
      }
    ],
    a:"",
    swiperImgUrls: [
      'https://www.dior.cn/couture/var/dior/storage/images/horizon/beauty/fragrance/collection-privee-christian-dior/discover-the-collection/01-the-grey-zone/40147665-1-int-EN/01-the-grey-zone_1440_1200.jpg',
      'https://www.dior.cn/couture/var/dior/storage/images/25789885/15-chi-CN/01-sauvage-elixir-20212_1440_1200.jpg',
      'https://www.dior.cn/couture/var/dior/storage/images/horizon/beauty/fragrance/womens-fragrance/discover-miss-dior-blooming-bouquet/01-love-is-a-bouquet/38812253-1-int-EN/01-love-is-a-bouquet_1440_1200.jpg',
      'https://www.dior.cn/couture/var/dior/storage/images/38970670/8-chi-CN/new-push-campaign-14_1440_1200.jpg',
      'https://www.dior.cn/couture/var/dior/storage/images/horizon/gifts/fragrance-beauty-services/the-art-of-gifting/cover-offrir-cherir/25369274-2-fre-FR/cover-offrir-cherir_1440_1200.jpg'
    ],
    swiperCurrent: 0,
    
},
maskClick:function(event){

  this.setData({a:this.data.masklist[event.currentTarget.dataset.id-1]}),
    wx.navigateTo({
    
      url: '/pages/detail/detail?img='+this.data.a.img,
      
    })
  },
 
 /**
   * 轮播自动滑动时，获取当前的轮播id
   */
  swiperChange(e) {
    const that = this;
    that.setData({
      swiperCurrent: e.detail.current
    })
  },

  /**
   * 图片手动滑动时，获取当前的轮播id
   */
  imageChange(e) {
    const that = this;
    that.setData({
      swiperCurrent: e.currentTarget.id
    })
  },


  // maskClick:function(e){
  //   let id = e.currentTarget.dataset.id;
  //   console.log(id);
  //   wx.navigateTo({
  //     url: '/pages/detail/detail?id=' + id,
  //   }) 
  // },
  home:function(en){
    let id = en.currentTarget.dataset.id;
    console.log(id);
    wx.switchTab({
      url: '/pages/home/home',
    })
  },
 

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {

  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady() {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow() {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide() {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload() {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh() {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom() {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage() {

  }
})